<?php

/**
 * Input3hour filter form base class.
 *
 * @package    TMD
 * @subpackage filter
 * @author     Thaihosting
 */
abstract class BaseInput3hourFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'X01'                  => new sfWidgetFormFilterInput(),
      'X02'                  => new sfWidgetFormFilterInput(),
      'E11'                  => new sfWidgetFormFilterInput(),
      'E12'                  => new sfWidgetFormFilterInput(),
      'E24'                  => new sfWidgetFormFilterInput(),
      'E25'                  => new sfWidgetFormFilterInput(),
      'E26'                  => new sfWidgetFormFilterInput(),
      'E31'                  => new sfWidgetFormFilterInput(),
      'E32'                  => new sfWidgetFormFilterInput(),
      'E41'                  => new sfWidgetFormFilterInput(),
      'E51'                  => new sfWidgetFormFilterInput(),
      'E61'                  => new sfWidgetFormFilterInput(),
      'E62'                  => new sfWidgetFormFilterInput(),
      'E81'                  => new sfWidgetFormFilterInput(),
      'E410'                 => new sfWidgetFormFilterInput(),
      'E501'                 => new sfWidgetFormFilterInput(),
      'SCURRENT_PHENOMENON'  => new sfWidgetFormFilterInput(),
      'SMSP_PHENOMENON'      => new sfWidgetFormFilterInput(),
      'SLSP_PHENOMENON'      => new sfWidgetFormFilterInput(),
      'BTSEND_NEWS'          => new sfWidgetFormFilterInput(),
      'SNEWS'                => new sfWidgetFormFilterInput(),
      'DTSAVE_TIME'          => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'SLOW_CLOUD_TYPE1'     => new sfWidgetFormFilterInput(),
      'NLOW_CLOUD_NUMBER1'   => new sfWidgetFormFilterInput(),
      'NLOW_CLOUD_HEIGHT1'   => new sfWidgetFormFilterInput(),
      'SLOW_CLOUD_TYPE2'     => new sfWidgetFormFilterInput(),
      'NLOW_CLOUD_NUMBER2'   => new sfWidgetFormFilterInput(),
      'NLOW_CLOUD_HEIGHT2'   => new sfWidgetFormFilterInput(),
      'SMIDDLE_CLOUD_TYPE'   => new sfWidgetFormFilterInput(),
      'NMIDDLE_CLOUD_NUMBER' => new sfWidgetFormFilterInput(),
      'SHIGH_CLOUD_TYPE'     => new sfWidgetFormFilterInput(),
      'NHIGH_CLOUD_NUMBER'   => new sfWidgetFormFilterInput(),
      'NRAINFALL_24HOURS'    => new sfWidgetFormFilterInput(),
      'E21'                  => new sfWidgetFormFilterInput(),
      'E22'                  => new sfWidgetFormFilterInput(),
      'E301'                 => new sfWidgetFormFilterInput(),
      'NBARO_PRESSURE'       => new sfWidgetFormFilterInput(),
      'NRAINFALL_6HOURS'     => new sfWidgetFormFilterInput(),
      'SNH'                  => new sfWidgetFormFilterInput(),
      'SCL'                  => new sfWidgetFormFilterInput(),
      'STR'                  => new sfWidgetFormFilterInput(),
      'SNEWS_NOTE'           => new sfWidgetFormFilterInput(),
      'NRAINFALL_MIDNIGHT'   => new sfWidgetFormFilterInput(),
      'E401'                 => new sfWidgetFormFilterInput(),
      'E402'                 => new sfWidgetFormFilterInput(),
      'E403'                 => new sfWidgetFormFilterInput(),
      'E404'                 => new sfWidgetFormFilterInput(),
      'E405'                 => new sfWidgetFormFilterInput(),
      'E406'                 => new sfWidgetFormFilterInput(),
      'NNH'                  => new sfWidgetFormFilterInput(),
      'E42'                  => new sfWidgetFormFilterInput(),
      'DTCREATE_TIME'        => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'IUSER_ID'             => new sfWidgetFormFilterInput(),
      'SIPADDRESS'           => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'X01'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'X02'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E11'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E12'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E24'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E25'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E26'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E31'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E32'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E41'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E51'                  => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'E61'                  => new sfValidatorPass(array('required' => false)),
      'E62'                  => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'E81'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E410'                 => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'E501'                 => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'SCURRENT_PHENOMENON'  => new sfValidatorPass(array('required' => false)),
      'SMSP_PHENOMENON'      => new sfValidatorPass(array('required' => false)),
      'SLSP_PHENOMENON'      => new sfValidatorPass(array('required' => false)),
      'BTSEND_NEWS'          => new sfValidatorPass(array('required' => false)),
      'SNEWS'                => new sfValidatorPass(array('required' => false)),
      'DTSAVE_TIME'          => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'SLOW_CLOUD_TYPE1'     => new sfValidatorPass(array('required' => false)),
      'NLOW_CLOUD_NUMBER1'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'NLOW_CLOUD_HEIGHT1'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'SLOW_CLOUD_TYPE2'     => new sfValidatorPass(array('required' => false)),
      'NLOW_CLOUD_NUMBER2'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'NLOW_CLOUD_HEIGHT2'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'SMIDDLE_CLOUD_TYPE'   => new sfValidatorPass(array('required' => false)),
      'NMIDDLE_CLOUD_NUMBER' => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'SHIGH_CLOUD_TYPE'     => new sfValidatorPass(array('required' => false)),
      'NHIGH_CLOUD_NUMBER'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'NRAINFALL_24HOURS'    => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E21'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E22'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E301'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'NBARO_PRESSURE'       => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'NRAINFALL_6HOURS'     => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'SNH'                  => new sfValidatorPass(array('required' => false)),
      'SCL'                  => new sfValidatorPass(array('required' => false)),
      'STR'                  => new sfValidatorPass(array('required' => false)),
      'SNEWS_NOTE'           => new sfValidatorPass(array('required' => false)),
      'NRAINFALL_MIDNIGHT'   => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E401'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E402'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E403'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E404'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E405'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'E406'                 => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'NNH'                  => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'E42'                  => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
      'DTCREATE_TIME'        => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'IUSER_ID'             => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'SIPADDRESS'           => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('input3hour_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Input3hour';
  }

  public function getFields()
  {
    return array(
      'ISTATION_ID'          => 'Number',
      'DTTIME'               => 'Date',
      'X01'                  => 'Number',
      'X02'                  => 'Number',
      'E11'                  => 'Number',
      'E12'                  => 'Number',
      'E24'                  => 'Number',
      'E25'                  => 'Number',
      'E26'                  => 'Number',
      'E31'                  => 'Number',
      'E32'                  => 'Number',
      'E41'                  => 'Number',
      'E51'                  => 'Number',
      'E61'                  => 'Text',
      'E62'                  => 'Number',
      'E81'                  => 'Number',
      'E410'                 => 'Number',
      'E501'                 => 'Number',
      'SCURRENT_PHENOMENON'  => 'Text',
      'SMSP_PHENOMENON'      => 'Text',
      'SLSP_PHENOMENON'      => 'Text',
      'BTSEND_NEWS'          => 'Text',
      'SNEWS'                => 'Text',
      'DTSAVE_TIME'          => 'Date',
      'SLOW_CLOUD_TYPE1'     => 'Text',
      'NLOW_CLOUD_NUMBER1'   => 'Number',
      'NLOW_CLOUD_HEIGHT1'   => 'Number',
      'SLOW_CLOUD_TYPE2'     => 'Text',
      'NLOW_CLOUD_NUMBER2'   => 'Number',
      'NLOW_CLOUD_HEIGHT2'   => 'Number',
      'SMIDDLE_CLOUD_TYPE'   => 'Text',
      'NMIDDLE_CLOUD_NUMBER' => 'Number',
      'SHIGH_CLOUD_TYPE'     => 'Text',
      'NHIGH_CLOUD_NUMBER'   => 'Number',
      'NRAINFALL_24HOURS'    => 'Number',
      'E21'                  => 'Number',
      'E22'                  => 'Number',
      'E301'                 => 'Number',
      'NBARO_PRESSURE'       => 'Number',
      'NRAINFALL_6HOURS'     => 'Number',
      'SNH'                  => 'Text',
      'SCL'                  => 'Text',
      'STR'                  => 'Text',
      'SNEWS_NOTE'           => 'Text',
      'NRAINFALL_MIDNIGHT'   => 'Number',
      'E401'                 => 'Number',
      'E402'                 => 'Number',
      'E403'                 => 'Number',
      'E404'                 => 'Number',
      'E405'                 => 'Number',
      'E406'                 => 'Number',
      'NNH'                  => 'Number',
      'E42'                  => 'Number',
      'DTCREATE_TIME'        => 'Date',
      'IUSER_ID'             => 'Number',
      'SIPADDRESS'           => 'Text',
    );
  }
}
